1. Field of the Invention
The present invention relates to a network device capable of deciding a communication speed that matches a network cable type, and relates to a control method and storage medium for the network device.
2. Description of the Related Art
Among network devices (such as printers and multi-function peripherals) each having a network interface, some network device has an auto-negotiation function for automatically setting the fastest communication speed among communication speeds that can be established between the network device and an external network device, which is connected to the network device via a network and a network cable (e.g., a LAN cable). With the auto-negotiation function (hereinafter sometimes referred to as the auto-negotiation), the fastest communication speed can be selected without the need for a user to intentionally select the communication speed matching the LAN cable type.
A LAN cable has a guaranteed communication speed that varies according to the type (hereinafter sometimes referred to as the category) thereof. For example, a so-called category 3 LAN cable, which is compatible with 10Base-T Ethernet (registered trademark, omitted hereinafter) standard, guarantees a maximum communication speed of 10 Mbps, but does not guarantee a maximum communication speed of 100 Mbps guaranteed by 100Base-TX. To use the category 3 LAN cable, therefore, the communication device must be linked with the external network device at a 10Base-T communication speed, which is set to be equal to or lower than 10 Mbps without using the auto-negotiation.
Nevertheless, the network device is often used at a communication speed which does not match the LAN cable category, and in most cases the auto-negotiation is used because of its convenience that a user is not required to intentionally set a communication speed at each network connection.
Between network devices each having the auto-negotiation function, it is possible to transmit and receive an FLP (fast link pulse) signal including information that represents communication speeds settable in each device and duplex information that represents full-duplex communication or half-duplex communication.
On the other hand, a network device having a fixedly set communication speed transmits an NLP (normal link pulse) signal that only includes communication speed information, and hence another network device using the auto-negotiation cannot obtain duplex information from the NLP and operates in half-duplex. In that case, there is a fear that an unstable communication state occurs between the network device that uses the auto-negotiation and operates in half-duplex and the network device that does not use the auto-negotiation and operates in full-duplex.
Since the FLP used for the auto-negotiation is low in speed, network devices can communicate with each other irrespective of their LAN cable categories. For example, even if a category 3 LAN cable compatible with a 10Base-T communication speed is used, a link can be established between network devices at a 100Base-TX communication speed higher than the 10Base-T communication speed. In other words, communication can be carried out at a 100Base-TX communication speed, while using a category 3 LAN cable.
Japanese Laid-open Patent Publication No. 2003-258937, for example, proposes a communication apparatus that stores information of an initially established communication speed, periodically monitors the communication speed in the communication, and performs the auto-negotiation to reestablish the initial communication speed when a reduction in communication speed is detected.
However, in an environment where a mismatch between LAN cable category and communication speed can cause a reduction in communication speed, if the auto-negotiation is performed to reestablish the initial communication speed when a reduction occurs in communication speed, the communication speed becomes not matching the LAN cable category, so that an unstable communication state is continued.